package com.zy.service;

import com.zy.mapper.TUserMapper;
import com.zy.model.TUser;
import com.zy.util.ResponseUtil;
import com.zy.vo.ResponseVO;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author zhy
 * @date 2025/6/21 14:04
 */
@Service
public class UserService {
    @Resource
    private TUserMapper userMapper;

    public ResponseVO<TUser> insert(TUser user){
        userMapper.insertSelective(user);
        return ResponseUtil.success(user);
    }

    public ResponseVO<List<TUser>> select(TUser user){
        List<TUser> list = userMapper.select(user);
        return ResponseUtil.success(list);
    }
}
